package m.jclecai.com.activity;

import android.content.Intent;

import m.jclecai.com.R;

import butterknife.OnClick;
import m.jclecai.com.base.BaseActivity;

public class SuccessActivity extends BaseActivity {


    //0-自购详情 1-追号详情 2-合买详情
    int tradeType;

    @Override
    public int getContentView() {
        return R.layout.activity_success;
    }

    @Override
    public void initData() {
        tradeType = getIntent().getIntExtra("tradeType",-1);
    }

    @Override
    public void initView() {
        setTitle("购买成功");
        leftOptionText("");
    }


    @OnClick(R.id.tv_look_lottery)
    void lookLottery(){
        switch (tradeType){
            case 0:
                //点击投注
                startActivity(new Intent(this, VoteRecordActivity.class)
                        .putExtra("index",0)
                        .putExtra("title","购买记录"));
                break;
            case 1:
                //点击追号
                startActivity(new Intent(this, VoteRecordActivity.class)
                        .putExtra("index",1)
                        .putExtra("title","追号记录"));
                break;
            case 2:
                //点击合买
                startActivity(new Intent(this, VoteRecordActivity.class)
                        .putExtra("index",2)
                        .putExtra("title","合买记录"));
                break;
        }
        finish();
    }

    @OnClick({R.id.tv_continue,R.id.tv_back})
    void continueBuy(){
//        BaseUtils.startAcy(this, VoteRecordActivity.class);
        finish();
    }
}
